<extend name="Public:common"/>
<block name="css">
    <style>
        .newMess th{text-align:center;}
    </style>
</block>
<block name="content">
    <div class="page-header"><h1><i class="fa fa-home"></i> 数据统计</h1></div>
     <div class="container-fluid">
         <!--线形图及饼状图-->
         <div class="row">
             <div class=" col-md-6 col-xs-6">
                 <form class="form-horizontal" method="post" action="{:U('welcome')}">
                     <div class="form-group">
                         <label for="pie_date" class="col-sm-2 control-label">日期选择:</label>
                         <div class="col-sm-8">
                             <input type="date" class="form-control" id="pie_date" placeholder="请选择日期">
                         </div>
                         <div class="col-sm-2">
                             <input type="submit" class="btn btn-primary" value="查询">
                         </div>
                     </div>
                 </form>
                <div id="pie"></div>
             </div>
             <div class=" col-md-6 col-xs-6">
                 <form class="form-horizontal" method="post" action="{:U('welcome')}">
                     <div class="form-group">
                         <label for="inputEmail3" class="col-sm-2 control-label">时间:</label>
                         <div class="col-sm-3">
                             <input type="date" class="form-control" id="strip_start" placeholder="开始时间">
                         </div>
                         <div class="pull-left" >至</div>
                         <div class="col-sm-3">
                             <input type="date" class="form-control" id="strip_end" placeholder="结束时间">
                         </div>
                         <div class="col-sm-2">
                             <input type="submit" class="btn btn-primary" value="查询">
                         </div>
                     </div>
                 </form>
                <div id="strip">
                </div>
             </div>
         </div>
         <!--线形图及饼状图结束-->

         <!--最新消息-->
         <h3>最新消息</h3>
         <div class="newMess">
             <table class="table table-striped table-bordered table-hover table-condensed text-center">
                 <tbody>
                 <tr>
                     <th>序号</th>
                     <th>线路名称</th>
                     <th>给运营商结算单价</th>
                     <th>发布部门/发布人</th>
                     <th>发布时间</th>
                     <th>处理时间</th>
                     <th>审核状态</th>
                     <th>操作</th>
                 </tr>

                 <tr>
                     <td>1</td>
                     <td>广州一日游</td>
                     <td>100</td>
                     <td>国内1部/李团</td>
                     <td>2017-08-07-13:00</td>
                     <td>2017-08-07-14:45</td>
                     <td>运营商已审核</td>
                     <td><a href="#" class="btn btn-xs btn-primary">待处理</a></td>
                 </tr>
                 </tbody>
             </table>
         </div>
         <!--最新消息结束-->


         <!--最新订单-->
         <h3>最新订单</h3>
         <div class="newMess">
             <table class="table table-striped table-bordered table-hover table-condensed text-center">
                 <tbody>
                 <tr >
                     <th>序号</th>
                     <th>线路名称</th>
                     <th>线路编号</th>
                     <th>团号</th>
                     <th>结算总额</th>
                     <th>处理时间</th>
                     <th>出团时间</th>
                     <th>余位</th>
                     <th>预计收客</th>
                     <th>状态</th>
                     <th>操作</th>
                 </tr>

                 <tr>
                     <td>1</td>
                     <td>广州一日游</td>
                     <td>gz01</td>
                     <td>JY20170807001</td>
                     <td>10000</td>
                     <td>2017-08-07-14:45</td>
                     <td>2017-08-10</td>
                     <td>4</td>
                     <td>50</td>
                     <td>已成团（待出团）</td>
                     <td>
                         <a href="#" class="btn btn-xs btn-primary">详情</a>
                         <a href="#" class="btn btn-xs btn-primary">结算</a>
                     </td>
                 </tr>
                 </tbody>
             </table>
         </div>
         <!--最新订单结束-->
     </div>
</block>
<block name="js">
    <script src="/Tpl/Operator/js/highcharts.js"></script>
    <script src="/Tpl/Operator/js/exporting.js"></script>
    <script src="/Tpl/Operator/js/highcharts-zh_CN.js"></script>
    <script>
        $(function () {
            //饼状图
            $('#pie').highcharts({
                chart: {
                    plotBackgroundColor: null,
                    plotBorderWidth: null,
                    plotShadow: false
                },
                title: {
                    text: '2014 某网站各浏览器浏览量占比'
                },
                tooltip: {
                    headerFormat: '{series.name}<br>',
                    pointFormat: '{point.name}: <b>{point.percentage:.1f}%</b>'
                },
                plotOptions: {
                    pie: {
                        allowPointSelect: true,
                        cursor: 'pointer',
                        dataLabels: {
                            enabled: true,
                            format: '<b>{point.name}</b>: {point.percentage:.1f} %',
                            style: {
                                color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
                            }
                        }
                    }
                },
                series: [{
                    type: 'pie',
                    name: '浏览器访问量占比',
                    data: [
                        ['Firefox',   45.0],
                        ['IE',       26.8],
                        {
                            name: 'Chrome',
                            y: 12.8,
                            sliced: true,
                            selected: true
                        },
                        ['Safari',    8.5],
                        ['Opera',     6.2],
                        ['其他',   0.7]
                    ]
                }]
            });

            //条形图

            /**
             * Highcharts 在 4.2.0 开始已经不依赖 jQuery 了，直接用其构造函数既可创建图表
             **/
            var chart = new Highcharts.Chart('strip', {
                title: {
                    text: '不同城市的月平均气温',
                    x: -20
                },
                subtitle: {
                    text: '数据来源: WorldClimate.com',
                    x: -20
                },
                xAxis: {
                    categories: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
                },
                yAxis: {
                    title: {
                        text: '温度 (°C)'
                    },
                    plotLines: [{
                        value: 0,
                        width: 1,
                        color: '#808080'
                    }]
                },
                tooltip: {
                    valueSuffix: '°C'
                },
                legend: {
                    layout: 'vertical',
                    align: 'right',
                    verticalAlign: 'middle',
                    borderWidth: 0
                },
                series: [{
                    name: '东京',
                    data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
                }, {
                    name: '纽约',
                    data: [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5]
                }, {
                    name: '柏林',
                    data: [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0]
                }, {
                    name: '伦敦',
                    data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
                }]
            });

        });

    </script>
</block>